package io;
import manager.Manager;
import java.util.Scanner;
public class IO {
	public void getInput(){
		String input = scanner.nextLine();
		
		while(input!=null&&this.manager.isGameEnd()!=true){
			int  col= Integer.parseInt( input ); 
			if(col>=0&&col<6){
				manager.process(col);
				if(this.manager.isGameEnd()!=true){
					System.out.print("Input the column you want to pop the ball:");
					input = scanner.nextLine();
				}
				else{
					System.out.println("Game End!");
				}
			}
			else{
				System.out.println("Column should be from 0 to 6!");
				System.out.print("Input the column you want to pop the ball:");
				input = scanner.nextLine();
			}
		}
	
	}
	private static Scanner scanner = new Scanner( System.in );
	private Manager manager = new Manager();

}
